from django.db import models

# Create your models here.


class Category(models.Model):
    name = models.CharField(verbose_name='分类', max_length=20)
    sort = models.PositiveSmallIntegerField(verbose_name='排序')

    class Meta:
        db_table = 'category_category'
        verbose_name = '分类'

    def __str__(self):
        return self.name


class Label(models.Model):
    name = models.CharField(verbose_name='标签', max_length=20)
    # sort = models.PositiveSmallIntegerField(verbose_name='排序')

    class Meta:
        db_table = 'category_label'
        verbose_name = '标签'